<template>
  <div class="mdui-drawer mdui-drawer-close" id="left-drawer">
    <!-- ... left drawer content ... 233 -->
    <!-- card -->
    <div class="mdui-grid-tile">
      <a href="javascript:;"><img src="@/assets/card-bg.jpg" /></a>
      <div class="mdui-grid-tile-actions">
        <div class="mdui-grid-tile-text">
          <div class="mdui-grid-tile-title">欢迎回来，管理员</div>
        </div>
      </div>
    </div>
    <!-- list -->
    <ul class="mdui-list">
      <!-- <li class="mdui-list-item mdui-ripple">
        <i class="mdui-list-item-icon mdui-icon material-icons"
          >&#xe1c3;</i>
        <div class="mdui-list-item-content">System message</div>
      </li> -->
      <router-link tag="li" to="/admin/sysInfo" class="mdui-list-item mdui-ripple">
          <i class="mdui-list-item-icon mdui-icon material-icons">&#xe1c3;</i>
          <div class="mdui-list-item-content">系统信息</div>
      </router-link>
      <!-- <li class="mdui-list-item mdui-ripple">
        <i class="mdui-list-item-icon mdui-icon material-icons">&#xe875;</i>
        <div class="mdui-list-item-content">DDNSCore</div>
      </li> -->
      <router-link tag="li" to="/admin/ddns" class="mdui-list-item mdui-ripple">
          <i class="mdui-list-item-icon mdui-icon material-icons">&#xe875;</i>
          <div class="mdui-list-item-content">DDNS设置</div>
      </router-link>
      <router-link tag="li" to="/admin/cloud" class="mdui-list-item mdui-ripple">
          <i class="mdui-list-item-icon mdui-icon material-icons">&#xe875;</i>
          <div class="mdui-list-item-content">用户管理</div>
      </router-link>
      <router-link tag="li" to="/admin/log" class="mdui-list-item mdui-ripple">
          <i class="mdui-list-item-icon mdui-icon material-icons">message</i>
          <div class="mdui-list-item-content">系统日志信息</div>
      </router-link>
      <!-- <i class="mdui-icon material-icons">message</i> -->
      <!-- none -->
      <!-- <li class="mdui-list-item mdui-ripple">
        <i class="mdui-list-item-icon"></i>
        <div class="mdui-list-item-content">Trash</div>
      </li> -->
      <li
        @click="exit()"
        class="mdui-list-item mdui-ripple">
        <i class="mdui-list-item-icon mdui-icon material-icons">exit_to_app</i>
        <div class="mdui-list-item-content">退出</div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  methods: {
    exit () {
      this.$store.commit('setToken', null)
      this.$store.commit('setUser', 'Guset')
      localStorage.removeItem('token')
      localStorage.removeItem('username')
      this.$router.push('/adminLogin')
    }
  }
}
</script>

<style>
</style>
